package com.ljb.android.comm.common

import android.app.Activity
import com.ljb.android.comm.router.core.RouterManager
import com.ljb.android.component.user.bean.UserBean

object LocUser {

    /**
     * 获取登录User
     * */
    fun getUser(): UserBean? {
        return RouterManager.getUserService()?.getUserInfo()
    }

    /**
     * 是否登录状态
     *
     * @param needLogin 是否弹出登陆页面
     */
    fun isLogIn(act: Activity? = null, needLogin: Boolean = false): Boolean {
        return RouterManager.getUserService()?.isLogin(act, needLogin) ?: false
    }

}